#include <iostream>

void sort(double x[],int s)
{
	for(int i=1;i<s;++i){
		int insert = x[i];
		int tex = i;
		while((tex > 0) && (x[tex-1]>insert)){
			x[tex] = x[tex-1];
			tex--;
		}
		x[tex] = insert;
	}
}

int main()
{
	std::cout << "nermuceq zangvac:\n";
    const int s=10;
	double x[s];
	for(int i=0;i<s;++i)
	{
		std::cout << "x[" << i << "]=";
		std::cin >> x[i];
	}
	sort(x,s);
	std::cout << "max1 = " << x[9] << "\n";
	for(int i=8;i>=0;--i)
	{
		if(x[i]!=x[9])
		{
			std::cout << "max2 = " << x[i] << "\n";
			break;
		}
	}
	return 0;
}